;; Base.scm
;; predefined functions

(define bool?
  (lambda (b)
    (cond
      ((eq? b #t) #t)
      ((eq? b #f) #t)
      (else #f))))

(define id
  (lambda (x) x))

(define atom?
  (lambda (x) 
    (and (not (pair? x)) (not (null? x)))))

(define add1
  (lambda (x) (+ x 1)))

(define sub1
  (lambda (x) (- x 1)))